package com.taobao.snowsnow.hibernate.pojo;

import java.sql.Timestamp;

public class ProductCollect extends ItemCollect {
	
	private Integer id;
	private String itemUrl;
	private Long numIid;
	private String picUrl;
	private Bow bow;
	private Timestamp createdTime;

	// TODO ProductCollect 里还需要一个List<Type>,里面装有该类所属的类型,以后通过这个属性就可以方便的找到ProductCollect
	
	public ProductCollect() {
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getItemUrl() {
		return this.itemUrl;
	}

	public void setItemUrl(String itemUrl) {
		this.itemUrl = itemUrl;
	}

	public Long getNumIid() {
		return this.numIid;
	}

	public void setNumIid(Long numIid) {
		this.numIid = numIid;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}

	public Timestamp getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Timestamp createdTime) {
		this.createdTime = createdTime;
	}

	public Bow getBow() {
		return bow;
	}

	public void setBow(Bow bow) {
		this.bow = bow;
	}

	@Override
	public String toString() {
		return "ProductCollect [id=" + id + ", itemUrl=" + itemUrl
				+ ", numIid=" + numIid + ", picUrl=" + picUrl
				+ ", createdTime=" + createdTime + ", name=" + name
				+ ", pinyin=" + pinyin + ", colors=" + colors + ", dimensions="
				+ dimensions + "]";
	}

	@Override
	public boolean equals(Object obj) {
		ProductCollect o = (ProductCollect) obj;
		
		if(o.getId() != null) {
			if(o.getId() == this.id)
				return true;
		}
		
		if(o.getNumIid() == this.getNumIid())
			return true;
		return false;
	}
}